(function($){
	$(function(){
		var resizePage = (function () {
            $("body").height($(window).height());
            var ww = $(window).width(),
                wh = $("body").innerHeight(),
                popTopH = $(".pop-top").outerHeight(true),
                popHeaderH = $(".pop-header").outerHeight(true),
                ulHeadH = $(".ul_head").outerHeight(true),
                $popWrap = $(".pop-wrap"),
                $ulBody = $(".ul_body");

            $popWrap.height(wh - popTopH - popHeaderH);
            $ulBody.height(wh - popTopH - popHeaderH -ulHeadH);
            return arguments.callee;
        })();
        
        var top = window.parent;
        console.log($("#test",top.document).attr("num"));

        $(window).resize(resizePage);
        //关闭弹出层
        $(".close-pop").on("click",function(e){
        	e.stopPropagation();
        	window.parent.$.popHide();
        })
		//点击切换tab
		$(".pop-header")
			.on("click",".pop-tab-item",function(e){
				e.stopPropagation();
				var type = $(this).attr("data-type");
				if(type == "view"){
					$(".view-content").removeClass("d-n");
					$(".handle-record").addClass("d-n");
				}else if(type == "record"){
					$(".view-content").addClass("d-n");
					$(".handle-record").removeClass("d-n");
				}
				$(this).addClass("on").siblings().removeClass("on");
			})
	})
})(jQuery)
